package m.jclecai.com.bean;

import android.text.TextUtils;

/**
 * Created by hp on 2017/4/24.
 */

public class UserBean {

    private String password;
    private String realname;//真实名称
    private String nickname;
    private String idcard;//身份证
    private String allmoney;    //账户余额
    private String redpacketmoney;
    private String prizeid;
    private String addtime;
    private String message;
    private String safe;//账户安全等级
    private String status;
    private String username;//昵称
    private String userpassword;
    private String balance;
    private String name;//真实姓名
    private String phone;
    private String phonenumberid;//0-未绑定 1-绑定
    private String bank;
    private String bankno;
    private String id;
    private String sendSanYuan;//1运行  0代表停止
    private int user_goldcoin;//金币
    private String user_id;//用户id
    private String user_face;//用户头像
    private String user_type;
    private String invite_code;
    private String alipay;

    public String getAlipay() {
        return alipay;
    }

    public void setAlipay(String alipay) {
        this.alipay = alipay;
    }

    public String getInvite_code() {
        return invite_code;
    }

    public void setInvite_code(String invite_code) {
        this.invite_code = invite_code;
    }

    private boolean isUserNameEmpty=false;

    public boolean isUserNameEmpty() {
        return isUserNameEmpty;
    }

    public void setUserNameEmpty(boolean userNameEmpty) {
        isUserNameEmpty = userNameEmpty;
    }

    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
        if(TextUtils.isEmpty(username)){
            username = nickname;
        }
    }

    public String getUser_type() {
        return user_type;
    }

    public void setUser_type(String user_type) {
        this.user_type = user_type;
    }

    public String getIdcard() {
        return idcard;
    }

    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }

    public String getAllmoney() {
        return allmoney;
    }

    public void setAllmoney(String allmoney) {
        this.allmoney = allmoney;
    }

    public String getRedpacketmoney() {
        return redpacketmoney;
    }

    public void setRedpacketmoney(String redpacketmoney) {
        this.redpacketmoney = redpacketmoney;
    }

    public String getPrizeid() {
        return prizeid;
    }

    public void setPrizeid(String prizeid) {
        this.prizeid = prizeid;
    }

    public String getAddtime() {
        return addtime;
    }

    public void setAddtime(String addtime) {
        this.addtime = addtime;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getSafe() {
        return safe;
    }

    public void setSafe(String safe) {
        this.safe = safe;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
        if(!TextUtils.isEmpty(nickname) && TextUtils.isEmpty(username)){
            this.username = nickname;
        }
    }

    public String getUserpassword() {
        return userpassword;
    }

    public void setUserpassword(String userpassword) {
        this.userpassword = userpassword;
    }

    public String getBalance() {
        return balance;
    }

    public void setBalance(String balance) {
        this.balance = balance;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPhonenumberid() {
        return phonenumberid;
    }

    public void setPhonenumberid(String phonenumberid) {
        this.phonenumberid = phonenumberid;
    }

    public String getBank() {
        return bank;
    }

    public void setBank(String bank) {
        this.bank = bank;
    }

    public String getBankno() {
        return bankno;
    }

    public void setBankno(String bankno) {
        this.bankno = bankno;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getSendSanYuan() {
        return sendSanYuan;
    }

    public void setSendSanYuan(String sendSanYuan) {
        this.sendSanYuan = sendSanYuan;
    }

    public int getUser_goldcoin() {
        return user_goldcoin;
    }

    public void setUser_goldcoin(int user_goldcoin) {
        this.user_goldcoin = user_goldcoin;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getUser_id() {
        return user_id;
    }

    public void setUser_id(String user_id) {
        this.user_id = user_id;
    }

    public String getUser_face() {
        return user_face;
    }

    public void setUser_face(String user_face) {
        this.user_face = user_face;
    }


    /**
     * 由UserBean，来创建一个BankBean；
     * @return 返回一个BankBean对象；
     */
    public BankBean createBankBean(){

        if(!TextUtils.isEmpty(bankno) && !TextUtils.isEmpty(bank)){
            BankBean bankBean = new BankBean();
            bankBean.setBank(bank);
            bankBean.setBankno(bankno);
            bankBean.setName(realname);
            return bankBean;
        }
        return null;
    }
}
